enhance: scope collection load and state reads - #25
Merged
sunby merged 1 commit intoSep 9, 2026
Merged
Conversation
Signed-off-by: sunby <sunbingyi1992@gmail.com>
sunby
merged commit Sep 9, 2026
78e8212
into
codex/load-1m-segments-pr-stack-rebased-qv-work
10 of 13 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Collection-scoped load and state reads currently rebuild global config or shard snapshots after unrelated updates. This change limits those reads to the requested collections, so their in-memory work scales with the selected configs and shards.
Related issue: this fork has issues disabled, so an associated issue could not be created.
Validation
loadmgr,coordview, andbalancerpackage tests passed with-race -tags dynamic,test -gcflags='all=-N -l'.golangci-lint --new-from-rev=HEADpassed for all four changed packages, including the staged new tests.run_clang_format.shandgit diff --checkpassed.make lint-fixwas run but is blocked by an existing base-branch typecheck error:internal/metastore/kv/querycoord/kv_catalog_test.go:372:15: undefined: mocks. Formatter edits outside this change were reverted.In-memory benchmark
Median of three 300 ms runs on Go 1.26.5, darwin/arm64, Apple M5, with
-tags dynamic,test -gcflags='all=-N -l'. Each iteration invalidates the full snapshot and reads one collection with one replica/shard. Persistence, RPCs, and concurrent contention are excluded.Point reads allocate zero bytes; scoped config and shard reads allocate 608 B and 352 B respectively at every size. These results validate the scoped in-memory cost; end-to-end UAT latency improvement has not been measured or deployed.